package com.bafa.front.admin;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.bafa.exceptions.ErrorException;
import com.bafa.front.DaddyServlet;
import com.bafa.front.utils.FrontUtils;
import com.bafa.objects.User;

public class AdminServlet extends DaddyServlet {

	
	@Override
	public void doEvent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ErrorException {
		if(FrontUtils.isLoggedOnAsAdmin(request))
			doAdminEvent(request,response);
		else{
			ErrorException error = new ErrorException();
			error.addErrorMessage("You have to logon as administrator for this function. Please logon.");
			throw error;
		}
	}
	
	public void doAdminEvent(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException,ErrorException{
		
	}
}
